package com.practice.J2E.util.dto;

import lombok.Data;

/**
 * @author kayn
 * @create 2023-12-11 下午 02:40
 */
@Data
public class AirportDTO {

    private String code;
    private String code2;
    private String code3;
    private String name;
    private String nameEN;
    private String nameCN;
    private String portCode;
    private String airportFourCode;
    private String continentCode;
    private String continentNameCN;
    private String countryCode;
    private String countryNameCN;
    private String provinceCode;
    private String provinceNameCN;
    private String cityCode;
    private String cityNameCN;
    private String cityNameEN;
    private String areaCode;
    private String timeZone;
    private String routeCode;
    private String routeNameCN;

    public static AirportDTO create(String code,String code2,String code3,String name) {
        AirportDTO airportDTO = new AirportDTO();
        airportDTO.setCode(code);
        airportDTO.setCode2(code2);
        airportDTO.setCode3(code3);
        airportDTO.setName(name);
        return airportDTO;
    }

    public String getId() {
        return code + "_" + code2 + "_" + code3;
    }

}
